﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <title></title>
  <script language="javascript">
    function read() { cardReader1.activex_read(); }
    function sale() {
      //      alert(7);
      //      if (window.ActiveXObject) {
      //      }
      var s = document.getElementById("Text1").value;
      //      alert(s);
      var v_ret = cardReader1.activex_write(s);
      //      var v_ret = "3_2012-05";
      var v_ssret = v_ret.split("_");
      //      var lbRET = document.getElementById("lbRET");
      //      lbRET.value = "111";
      //      alert(lbRET.value);
      var v_href = "../SSFGL/SSFGLExport.aspx?";
      v_href = v_href + "khid=" + v_ssret[0];
      v_href = v_href + "&cbsjid=" + v_ssret[1];
      v_href = v_href + "&jfsjid=" + v_ssret[2];
      var v_dy = document.getElementById("dy");
      v_dy.href = v_href;
    }
  </script>
</head>
<body>
  <object id="cardReader1" classid="clsid:E1879E8E-73DA-47ED-A7CF-9798A708A75B" width="600"
    height="350">
  </object>
  <form id="form1" runat="server">
  <table style="margin-left: 200px;">
    <tr>
      <td>
        <input type="text" id="Text1" value='<%=user %>' style="display: none;" />
        <%--<input type="text" id="lbRET" style="display: none;" />--%>
        <%-- <asp:Label ID="lbRET" runat="server" Text="Label" Visible="false"></asp:Label>--%>
      </td>
      <td width="100px">
        <input id="Button1" type="button" value="读卡" onclick="read();" />
      </td>
      <td width="100px">
        <input id="Button1" type="button" value="售气" onclick="javascript:sale()" />
      </td>
      <td width="100px">
        <a id="dy" href="../SSFGL/SSFGLExport.aspx" target="_blank">打印</a>
      </td>
    </tr>
  </table>
  </form>
</body>
</html>
